<template>
	<view>
		<view class="page">
			<comp-common v-bind="{data:data}"></comp-common>
			<comp-header v-bind="{data:data}"></comp-header>
			<view class="body after-navber">
				<view v-if="data.authorize==true">
					<view class="top">
						<navigator url="/step/detail/detail" class="vitality">
							<image class="icon" src="../../static/step/price.png"></image>
							<view class="vitality-text">我的{{data.dapp.option.step.currency_name?data.dapp.option.step.currency_name:'活力币'}}</view>
							<view class="vitality-num">{{data.my}}</view>
							<image class="look" src="../../static/step/right.png"></image>
						</navigator>


					</view>
					<view class="today">
						<image class="bg" :src="data.__wxapp_img.step.home_bg.url"></image>

						<navigator class="today-top" url="/step/top/top">
							<image src="../../static/step/top.png"></image>
						</navigator>
						<navigator class="today-index" url="/pages/index/index">
							<image src="../../static/step/index.png"></image>
						</navigator>
						<navigator class="rule" url="/step/rules/rules">
							<text>规则</text>
						</navigator>
						<view @click="exchange" class="button">
							<view class="today-step">今日可兑步数</view>
							<view class="step-num">{{data.overStep}}</view>
							<view>点击兑换</view>
							<view class="today-msg">每日零点清零</view>
						</view>
						<view @click="refresh" class="refresh">
							<image src="../../static/step/refresh.png"></image>
							<text>同步微信最新步数</text>
						</view>

						<navigator class="invite" :url="'../share/share?todayStep='+data.todayStep">
							<text>邀请好友获得永久步数加成</text>
						</navigator>

						<view class="help">
							<view class="friend">
								<view class="friend-left">
									<text>好友助力</text>
								</view>
								<view class="friend-right">
									<view class="friend-avatar" v-for="(aitem,avatar) in data.friend" :key="avatar">
										<image :src="aitem.avatar_url"></image>
									</view>
									<view style="display: flex;">

										<navigator :url="'../share/share?todayStep='+data.todayStep" style="margin-right:20upx;" v-if="data.length<4">
											<image src="../../static/step/friend.png"></image>
										</navigator>
										<navigator :url="'../share/share?todayStep='+data.todayStep" style="margin-right:20upx;" v-if="data.length<3">
											<image src="../../static/step/friend.png"></image>
										</navigator>
										<navigator :url="'../share/share?todayStep='+data.todayStep" style="margin-right:20upx;" v-if="data.length<2">
											<image src="../../../static/step/friend.png"></image>
										</navigator>
										<navigator :url="'../share/share?todayStep='+data.todayStep" style="margin-right:20upx;" v-if="data.length<1">
											<image src="../../static/step/friend.png"></image>
										</navigator>
										<navigator url="'../friend/friend" class="more">
											<view style="display: flex;">
												<text>查看更多</text>
												<image src="../../static/step/right.png"></image>
											</view>
										</navigator>

									</view>


								</view>
							</view>
							<view class="addition" style="margin-bottom:10upx;">
								总邀请{{data.user.all_invite}}人，今日邀请{{data.user.now_invite}}人
							</view>
							<view class="addition">
								当前步数加成{{data.nowAdd}}%，明天步数加成{{data.nextAdd}}%
							</view>
						</view>
					</view>
					<!-- #ifdef MP-WEIXIN  -->
					<ad @error="adError" :unitId="data.unit_id" v-if="data.unit_id&&data.uniit_id!=undefined"></ad>
					<!-- #endif -->
					<view class="remind">
						<view class="remind-text">
							<view>每日兑换提醒</view>
							<view class="day">{{data.dapp.option.step.currency_name?data.dapp.option.step.currency_name:'活力币'}}可兑换礼物,记得每天来看看哟</view>
						</view>
						<switch bindchange="switch" :checked="checked" class="switch"></switch>
					</view>
					<swiper autoplay indicatorDots class="ad" indicatorActiveColor="rgb(255,69,68)">
						<swiper-item v-for="(bitem,pic) in data.banner_list" :key="pic">
							<form @submit="_formIdSubmit" data-type="navigate" :data-url="bitem.page_url" reportSubmit="true">
								<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
									<image :id="bitem.dapp_id" mode="aspectFill" :src="bitem.pic_url"></image>
								</button>
							</form>
						</swiper-item>
					</swiper>
					<view class="dare" v-if="data.activity_data.id>0">
						<view class="dare-banner">
							<view class="dare-title">步数挑战</view>
							<view class="dare-date" v-if="data.activity_data.id>0&&time!=open_date">{{data.activity_data.open_date}}开始</view>
							<view class="dare-date" v-if="data.activity_data.id>0&&time==open_date">{{data.activity_data.name}}进行中</view>
							<form @submit="_formIdSubmit" class="dare-right" data-type="navigate" data-url="../dare/dare" reportSubmit="true">
								<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
									<view>
										<text>更多</text>
										<image src="../image/right.png"></image>
									</view>
								</button>
							</form>
						</view>
						<view class="no-dare" v-if="data.dare==false">
							<image src="../../static/step/none.png"></image>
							<view>暂无挑战赛哦</view>
						</view>
						<view class="dare-item" v-if="data.dare==true">
							<view class="item-img">
								<image src="../../static/step/dare.png"></image>
							</view>
							<view class="dare-info" v-if="data.time==data.open_date&&data.activity_data.log.length==0">
								<view>奖金池总额</view>
								<view class="info-num">{{data.activity_data.suc_currency}}</view>
								<view>达标人数</view>
								<view class="info-num">{{data.activity_data.suc_num}}</view>
							</view>
							<view class="item" v-if="data.time!=data.open_date||data.activity_data.log.length!=0">
								<view class="target-step">目标步数
									<text>{{data.activity_data.step_num}}</text> 步
								</view>
								<view v-if="data.time!=data.open_date">
									<view class="dare-gold">挑战保证金
										<text>{{data.activity_data.bail_currency}}{{data.dapp.option.step.currency_name?dapp.option.step.currency_name:'活力币'}}</text>
									</view>
									<view>已有{{data.activity_data.people_num}}人参加</view>
								</view>
								<view class="target-step" v-if="data.activity_data.log.length!=0&&data.time==data.open_date">已完成
									<text>{{data.todayStep}}</text> 步
								</view>
								<view class="start" v-if="data.activity_data.log.length!=0&&data.finish==false&&data.time==data.open_date">距目标越来越近了，加油哦~</view>
								<!-- #ifdef MP-WEIXIN -->
								<button class="join-over" openType="share" v-if="data.activity_data.log.length!=0&&data.time!=data.open_date">已参赛，邀请好友</button>
								<!-- #endif -->
								<!-- #ifdef H5 -->
								<button class="join-over" @click="$webShare" v-if="data.activity_data.log.length!=0&&data.time!=data.open_date">已参赛，邀请好友</button>
								<!-- #endif -->
								<button class="submit-over" v-if="data.time==data.open_date&&data.finish==true&&data.activity_data.log_status==2">已提交成绩</button>
								<form @submit="_formIdSubmit" data-type="navigate" :data-url="'../join/join?id='+data.activity_data.id" reportSubmit="true">
									<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
										<button class="join" v-if="data.activity_data.log.length==0&&data.time!=data.open_date">立即参加</button>
									</button>
								</form>
								<form @submit="_formIdSubmit" data-type="navigate" :data-url="'../dare/dare?user_id='+data.user_id" reportSubmit="true">
									<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
										<button class="join" v-if="data.activity_data.log.length!=0&&data.finish==true&&data.time==data.open_date&&data.activity_data.log_status==3">提交成绩</button>
									</button>
								</form>
							</view>
						</view>
					</view>
					<view class="exchange-title">
						<image src="../../static/step/exchange.png"></image>
						<text>免费兑换</text>
					</view>
					<view class="good-list">
						<view class="good" v-for=" (good,gindex)  in data.goods" :key="gindex">
							<form @submit="_formIdSubmit" data-type="navigate" :data-url="'../goods/goods?goods_id='+good.id" reportSubmit="true">
								<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
									<image :src="good.cover_pic"></image>
									<view class="good-info">
										<view class="good-name">{{good.name}}</view>
										<view class="good-price">{{good.price}}{{data.dapp.option.step.currency_name?data.dapp.option.step.currency_name:'活力币'}}</view>
										<button class="good-exchange">立即兑换</button>
									</view>
								</button>
							</form>
						</view>
					</view>
					<view class="loading" v-if="data.loading">正在加载中...</view>
				</view>
				<view class="over-screen" v-if="data.authorize==false">
					<view class="window">为确保您的正常使用，请完善授权操作</view>
					<view @click="openSetting" class="get-setting">确认</view>
				</view>
			</view>
			<comp-footer v-bind="{data:data}"></comp-footer>
		</view>

	</view>
</template>

<script>
	var myVue = {};
	//#ifndef H5
	var Vue = require('vue')
	//#endif
	//#ifdef H5
	var Vue = require('vue').default
	//#endif
	function e(e, t, a) {
		return t in e ? Object.defineProperty(e, t, {
			value: a,
			enumerable: !0,
			configurable: !0,
			writable: !0
		}) : e[t] = a, e;
	}
	var t, a = require("../../utils/helper.js"),
		o = Vue.prototype.getApp.helper;
	export default e({
			data() {
				return {
					data: {
						dare: !1,
						my: "0",
						todayStep: "0",
						authorize: !0,
						overStep: "0",
						banner_list: [],
						useStep: "0",
						nowAdd: "0.00",
						today: "",
						nextAdd: "0.00",
						people: "2153",
						friend: [],
						now: !1,
						convert_ratio: "",
						activity_data: [{
							id: 0
						}, {
							open_date: ""
						}, {
							name: ""
						}, {
							bail_currency: 0
						}, {
							step_num: 0
						}],
						convert_max: 0,
						title: "",
						goods: [],
						user_id: 0,
						time: "",
						encrypted_data: "",
						iv: "",
						code: "",
						page: 2,
						unit_id: "",
						user: {}
					}
				}
			},

			methods: {
				getUCode() {
					uni.login({
						success(res) {
							this.setData({
								code: res.code
							})
							console.log(res.code)
						}
					})
				},
				switch: function(e) {
					var that = this;
					var t = 0;
					t = 1 == e.detail.value ? 1 : 0, that.getApp.request({
						url: that.getApp.api.step.remind,
						data: {
							remind: t
						}
					});
				},
				exchange: function() {
					var e = this,
						t = void 0,
						a = void 0,
						o = void 0,
						n = e.data.nowAdd,
						i = e.data.todayStep * (1 + n / 100),
						d = e.data.useStep,
						r = e.data.convert_ratio,
						s = e.data.convert_max,
						c = parseInt(i);
					s > 0 && c > +s && (c = +s), c -= d;
					var p = e.data.overStep,
						u = (c / r).toString().match(/^\d+(?:\.\d{0,2})?/);
					u < .01 || 0 == p ? e.getApp.core.showModal({
						content: "步数不足",
						showCancel: !1
					}) : e.getApp.core.showModal({
						content: "确认把" + p + "步兑换为" + u + (e.data.dapp.option.step.currency_name ? e.data.dapp.option.step.currency_name :
							"活力币"),
						success: function(n) {
							n.confirm && (e.getApp.core.showLoading({
								title: "兑换中...",
								mask: !0
							}), e.getApp.core.login({
								success: function(n) {
									a = n.code, e.getApp.core.getWeRunData({
										success: function(n) {
											t = n.iv, o = n.encryptedData, e.getApp.request({
												url: e.getApp.api.step.convert,
												method: "post",
												data: {
													iv: t,
													code: a,
													encrypted_data: o,
													num: e.data.todayStep
												},
												success: function(t) {
													if (e.getApp.core.hideLoading(), 0 == t.code) {
														s > 0 && c > +s && (c = +s), c -= t.list.num;
														var a = (+e.data.my + +t.list.convert).toFixed(2);
														e.setData({
															overStep: c,
															my: a,
															useStep: t.list.num
														});
													} else e.getApp.core.showModal({
														content: t.msg,
														showCancel: !1
													});
												}
											});
										}
									});
								}
							}));
						},
						fail: function(e) {
							e.getApp.core.hideLoading(), e.getApp.core.showModal({
								content: "为确保您的正常使用，请完善授权操作",
								showCancel: !1
							});
						}
					});
				},
				adError: function(e) {
					console.log(e.detail);
				},
				refresh: function() {
					myVue.getApp.core.showLoading({
						title: "步数加载中...",
						mask: !0
					});
					var e = this,
						t = e.data.convert_max;
					e.runData(e.data.user_id, t);
				},
				runData: function(t, a) {
					var o = this,
						n = void 0,
						i = void 0,
						d = void 0;
					o.getApp.core.login({
						success: function(r) {
							console.log("getUserInfo...");
							console.log(r);
							n = r.code, o.getApp.core.getWeRunData({
								success: function(r) {
									i = r.iv, d = r.encryptedData, o.getApp.request({
										url: o.getApp.api.step.index,
										method: "POST",
										data: {
											encrypted_data: d,
											iv: i,
											code: n,
											user_id: t,
											page: 1
										},
										success: function(r) {
											o.getApp.core.hideLoading();
											var s = void 0,
												c = void 0;
											null == r.data.activity_data.id ? (c = !1, s = []) : (c = !0, s = r.data.activity_data);
											var p = r.data.run_data.stepInfoList,
												u = r.data.user_data,
												g = void 0,
												h = [{
													pic_url: "../../static/step/ad.png"
												}];
											r.data.banner_list.length > 0 && (h = r.data.banner_list);
											var l = !1;
											null !== r.data.ad_data && (l = r.data.ad_data.unit_id);
											var v = u.step_currency,
												_ = r.data.ad_data,
												f = r.data.goods_data,
												A = p[p.length - 1].step,
												m = p[p.length - 1].timestamp,
												w = u.ratio / 10,
												y = u.invite_list,
												S = 0,
												D = 0;
											u.now_ratio && (D = u.now_ratio / 10);
											var M = void 0;
											0 == u.remind ? M = !1 : 1 == u.remind && (M = !0), u.convert_num > 0 && (S = u.convert_num);
											var x = parseInt(A * (1 + D / 100));
											a > 0 && x > +a && (x = +a), (x -= +S) >= 1e3 && (x = String(x).replace(/(\d)(?=(\d{3})+$)/g,
												"$1,"));
											var L = "";
											void 0 != s.open_date && (L = s.open_date.replace(".", "").replace(".", "")), g = !(s.step_num >
													A),
												x < 0 && (x = 0);
											var C = y.length;
											o.setData({
												overStep: x,
												todayStep: A,
												nextAdd: w,
												friend: y,
												today: m,
												finish: g,
												nowAdd: D,
												my: v,
												now: !0,
												user: u,
												length: C,
												banner_list: h,
												useStep: S,
												goods: f,
												user_id: t,
												checked: M,
												encrypted_data: d,
												iv: i,
												page: 2,
												code: n,
												open_date: L,
												activity_data: s,
												dare: c,
												ad_data: _,
												unit_id: l
											});
										},
										fail: function(e) {
											o.getApp.core.showModal({
												content: e.errMsg,
												showCancel: !1
											});
										}
									});
								},
								fail: function(e) {
									"getWeRunData:fail cancel" == e.errMsg ? o.getApp.core.showModal({
										content: "读取失败，请稍后再试",
										showCancel: !1
									}) : "getWeRunData: fail device not support" == e.errMsg ? o.getApp.core.showModal({
										content: '请在微信中搜索"微信运动"公众号，并点击关注',
										showCancel: !1
									}) : o.getApp.core.showModal({
										content: e.errMsg,
										showCancel: !1
									});
								}
							});
						},
						fail: function(e) {
							o.getApp.core.showModal({
								content: e.errMsg,
								showCancel: !1
							});
						}
					});
				},
				openSetting: function() {
					var e = this;
					e.getApp.core.openSetting({
						success: function(t) {
							if (1 == t.authSetting["scope.werun"] && 1 == t.authSetting["scope.userInfo"]) {
								e.setData({
										authorize: !0
									}),
									e.getApp.core.showLoading({
										title: "步数加载中...",
										mask: !0
									});
								var a = e.data.user_id,
									o = e.data.convert_max;
								e.runData(a, o);
							}
						},
						fail: function(t) {
							e.setData({
								authorize: !1
							}), e.getApp.core.hideLoading();
						}
					});
				},
			},



			onShareAppMessage: function(e) {
				return myVue.getApp.page.onShareAppMessage(this), {
					path: "/step/dare/dare?user_id=" + myVue.getApp.getUser().id,
					title: this.data.title ? this.data.title : "步数挑战"
				};
			},
			onReachBottom: function() {
				var e = this,
					t = e.data.over;
				if (!t) {
					var a = this.data.encrypted_data,
						o = this.data.iv,
						n = this.data.code,
						i = this.data.user_id,
						d = this.data.goods,
						r = this.data.page;
					this.setData({
						loading: !0
					}), e.getApp.request({
						url: e.getApp.api.step.index,
						method: "POST",
						data: {
							encrypted_data: a,
							iv: o,
							code: n,
							user_id: i,
							page: r
						},
						success: function(a) {
							for (var o = 0; o < a.data.goods_data.length; o++) d.push(a.data.goods_data[o]);
							a.data.goods_data.length < 6 && (t = !0), e.setData({
								goods: d,
								page: r + 1,
								over: t,
								loading: !1
							});
						}
					});
				}
			},

			onShow: function() {
				if (0 != this.data.now) {
					var e = this,
						t = void 0,
						a = void 0,
						o = void 0,
						n = e.data.user_id;
					e.getApp.core.login({
						success: function(i) {
							t = i.code, e.getApp.core.getWeRunData({
								success: function(i) {
									a = i.iv, o = i.encryptedData, e.getApp.request({
										url: e.getApp.api.step.index,
										method: "POST",
										data: {
											encrypted_data: o,
											iv: a,
											code: t,
											user_id: n,
											page: 1
										},
										success: function(t) {
											e.getApp.core.hideLoading();
											var a = t.data.activity_data,
												o = t.data.user_data,
												n = t.data.user_data.step_currency;
											e.setData({
												activity_data: a,
												user_data: o,
												my: n
											});
										}
									});
								}
							});
						}
					});
				}
			},
			onLoad: function(e) {
				myVue = this;
				myVue.getApp.page.onLoad(this, e);
				var t = 0;
				if (null !== e.scene) {
					var n = decodeURIComponent(e.scene),
						i = myVue.getApp.helper.scene_decode(n);
					i.uid > 0 && (t = i.uid);
				}
				e.user_id > 0 && (t = e.user_id), this.setData({
					user_id: t,
					now: !1
				});
				var d = myVue.getApp.helper.formatTime(new Date()),
					r = d[0] + d[1] + d[2] + d[3] + d[5] + d[6] + d[8] + d[9];
				this.setData({
						time: r
					}),
					myVue.getApp.core.showLoading({
						title: "步数加载中...",
						mask: !0
					}),
					myVue.getApp.page.onShow(this), myVue.getApp.core.showShareMenu({
						withShareTicket: !0
					});
				var s = this,
					c = void 0;
				s.getApp.request({
					url: s.getApp.api.step.setting,
					success: function(e) {
						if (0 == e.code) {
							var a = e.data.title,
								o = e.data.share_title;
							c = e.data.convert_max, a && (s.getApp.core.setNavigationBarTitle({
								title: a
							}), s.setData({
								title: a,
								share_title: o
							})), s.setData({
								convert_ratio: e.data.convert_ratio,
								convert_max: c
							}), s.getApp.core.getSetting({
								success: function(e) {
									1 == e.authSetting["scope.werun"] && 1 == e.authSetting["scope.userInfo"] ?
										s.runData(t, c) : s.getApp
										.core.authorize({
											scope: "scope.userInfo",
											success: function(e) {
												s.getApp.core.authorize({
													scope: "scope.werun",
													success: function(e) {
														"authorize:ok" == e.errMsg && s.runData(t, c);
													},
													fail: function(e) {
														s.setData({
															authorize: !1
														}), s.getApp.core.hideLoading();
													}
												});
											}
										});
								},
								fail: function(e) {
									s.setData({
										authorize: !1
									}), s.getApp.core.hideLoading();
								}
							});
						}
					},
					fail: function(e) {
						s.getApp.core.showModal({
							content: e.errMsg,
							showCancel: !1
						});
					}
				});
				this.getUCode();
			},
		},
		"onShareAppMessage",
		function(e) {
			return Vue.prototype.getApp.page.onShareAppMessage(this), {
				path: "/step/index/index?user_id=" + Vue.prototype.getApp.getUser().id,
				title: this.data.share_title ? this.data.share_title : this.data.title
			};
		})
</script>

<style scoped>
	page {
		background-color: #f7f7f7;
	}

	button::after {
		border: none;
	}

	.top {
		border-top: 1upx solid #E2E2E2;
		height: 87upx;
		line-height: 87upx;
		width: 100%;
		background-color: white;
		color: #353535;
		z-index: 1;
	}

	.icon {
		width: 48upx;
		height: 48upx;
		float: left;
		margin-top: 20upx;
		margin-left: 20upx;
		padding: 8upx;
	}

	.vitality-text {
		display: inline-block;
		font-size: 11pt;
	}

	.vitality-num {
		display: inline-block;
		color: #ff9d1e;
		font-size: 11pt;
		margin-left: 8upx;
	}

	.look {
		float: right;
		height: 22upx;
		width: 12upx;
		margin-right: 24upx;
		margin-top: 33upx;
	}

	.today {
		height: 770upx;
		text-align: center;
		color: #353535;
		font-size: 9pt;
		position: relative;
		padding-bottom: 50upx;
		margin-bottom: 60upx;
	}

	.bg {
		width: 100%;
		height: 100%;
		z-index: 1;
	}

	.today-top {
		height: 74upx;
		width: 74upx;
		position: absolute;
		top: 40upx;
		left: 24upx;
	}

	.today-index {
		height: 74upx;
		width: 74upx;
		position: absolute;
		top: 144upx;
		left: 24upx;
	}

	.today-top image {
		height: 74upx;
		width: 74upx;
	}

	.today-index image {
		height: 74upx;
		width: 74upx;
	}

	.today-wechat {
		height: 88upx;
		width: 88upx;
		position: absolute;
		top: 300upx;
		right: 24upx;
	}

	.rule {
		position: absolute;
		right: 0;
		top: 40upx;
		color: white;
		height: 48upx;
		width: 90upx;
		line-height: 48upx;
		border-top-left-radius: 24upx;
		border-bottom-left-radius: 24upx;
		background-color: rgba(0, 0, 0, .2);
	}

	.rule text {
		font-size: 9pt;
		height: 48upx;
		width: 90upx;
		line-height: 24upx;
	}

	.today-step {
		padding-top: 48upx;
		z-index: 2;
	}

	.step-num {
		font-size: 24pt;
		margin: 6upx 0;
		z-index: 2;
		font-family: 'DIN';
	}

	.today-msg {
		color: #999999;
		margin: 8upx 0 40upx;
		font-size: 7pt;
		z-index: 2;
	}

	.button {
		height: 280upx;
		width: 280upx;
		position: absolute;
		left: 0;
		right: 0;
		margin: 0 auto;
		top: 84upx;
	}

	.refresh {
		position: absolute;
		top: 396upx;
		left: 0;
		right: 0;
		margin: 0 auto;
		width: auto;
		text-align: center;
		font-size: 10pt;
		color: #666666;
	}

	.refresh image {
		height: 24upx;
		width: 24upx;
		margin-right: 10upx;
	}

	.invite {
		position: absolute;
		top: 452upx;
		left: 0;
		right: 0;
		margin: 0 auto;
		background: linear-gradient(to right, #FF9D1E, #ffb81e);
		height: 80upx;
		border-radius: 40upx;
		box-shadow: 0 0 20upx #ffb71e;
		text-shadow: 0 0 6upx #ffb81e;
		line-height: 80upx;
		color: white;
		width: 500upx;
	}

	.invite-btn {
		background: linear-gradient(to right, #FF9D1E, #ffb81e);
		height: 80upx;
		border-radius: 40upx;
		font-size: 11pt;
		line-height: 80upx;
		color: white;
		width: 500upx;
	}

	.help {
		position: absolute;
		top: 566upx;
		left: 24upx;
		width: 702upx;
		background-color: white;
		padding: 32upx 0;
		z-index: 5;
	}

	.friend {
		height: 80upx;
		width: 702upx;
		margin-bottom: 30upx;
	}

	.friend-left {
		float: left;
		font-size: 9pt;
		height: 80upx;
		width: 108upx;
		color: #ff9d1e;
		background-color: #ffebd2;
		text-align: center;
		border-top-right-radius: 40upx;
		border-bottom-right-radius: 40upx;
		font-weight: bold;
		padding: 8upx 0;
		margin-right: 34upx;
	}

	.friend-right {
		display: inline-block;
		width: 536upx;
		height: 80upx;
		margin-right: 24upx;
		text-align: left;
	}

	.friend-avatar {
		display: inline-block;
		width: 80upx;
		height: 80upx;
		vertical-align: top;
		margin-right: 20upx;
	}

	.friend-right image {
		height: 80upx;
		width: 80upx;
		border-radius: 40upx;
	}

	.friend-right form {
		display: inline-block;
	}

	.addition {
		text-align: center;
		font-size: 9pt;
		color: #666666;
	}

	ad {
		margin-top: 20upx;
		width: 100%;
		background-color: white;
		color: #353535;
		font-size: 11pt;
	}

	.remind {
		margin-top: 20upx;
		height: 120upx;
		width: 100%;
		padding: 24upx;
		background-color: white;
		color: #353535;
		font-size: 10pt;
	}

	.day {
		margin-top: 8upx;
		color: #999999;
		font-size: 9pt;
	}

	.remind-text {
		float: left;
	}

	.switch {
		float: right;
		margin-top: 8upx;
	}

	.wx-switch-input {
		width: 88upx !important;
		height: 48upx !important;
		background: #4fd866 !important;
		border: #4fd866 !important;
	}

	.wx-switch-input::before {
		width: 88upx !important;
		height: 48upx !important;
	}

	.wx-switch-input::after {
		width: 40upx !important;
		height: 40upx !important;
		margin-top: 4upx;
	}

	.ad {
		height: 190upx;
		width: 100%;
		margin-top: 20upx;
		margin-bottom: 20upx;
	}

	.ad form {
		width: 100%;
		height: 190upx;
	}

	.ad image {
		width: 100%;
		height: 190upx;
	}

	.dare {
		padding: 40upx 0 40upx 32upx;
		margin: 0 24upx;
		background-color: white;
		border-radius: 16upx;
	}

	.dare-banner {
		color: #666666;
		font-size: 9pt;
		height: 40upx;
		line-height: 40upx;
		margin-bottom: 80upx;
	}

	.dare-right {
		float: right;
		height: 40upx;
		line-height: 40upx;
		margin-right: 32upx;
		color: #666666;
		font-size: 9pt;
	}

	.no-dare {
		margin: 54upx auto 0;
		width: 300upx;
		font-size: 11pt;
		color: #999999;
		text-align: center;
		background-color: white;
	}

	.join-over {
		height: 56upx;
		width: 280upx;
		border-radius: 28upx;
		background-color: #ffffff;
		color: #ff9d1e;
		border: 1px solid #ff9d1e;
		font-size: 10pt;
		line-height: 56upx;
		margin: 18upx 0 20upx;
	}

	.submit-over {
		height: 56upx;
		width: 210upx;
		border-radius: 28upx;
		background-color: #ffffff;
		color: #ff9d1e;
		border: 1px solid #ff9d1e;
		font-size: 10pt;
		line-height: 56upx;
		margin: 18upx 0 20upx;
	}

	.no-dare image {
		height: 300upx;
		width: 300upx;
		margin-bottom: 40upx;
	}

	.dare-info {
		color: #999999;
		font-size: 11pt;
		margin-top: -4upx;
	}

	.info-num {
		margin: 5upx 0 26upx;
		font-size: 16pt;
		color: #ff9d1e;
	}

	.dare-date {
		float: left;
		width: auto;
	}

	.dare-title {
		font-size: 13pt;
		color: #353535;
		padding: 0 13upx;
		border-left: 6upx solid #ff9d1e;
		float: left;
	}

	.dare-banner image {
		height: 20upx;
		width: 10upx;
		margin-left: 12upx;
	}

	.height {
		height: 20upx;
	}

	.start {
		color: #666666;
		font-size: 9pt;
		margin-top: 30upx;
		margin-bottom: 30upx;
	}

	.dare-item {
		height: 250upx;
		background-color: white;
	}

	.dare-item .item-img {
		margin: -28upx 64upx 0 0;
		height: 250upx;
		width: 250upx;
		float: left;
	}

	.dare-item .item-img image {
		width: 250upx;
		height: 250upx;
	}

	.dare-item .item {
		color: #666666;
		height: 250upx;
		float: left;
		width: 52.5%;
	}

	.target-step {
		color: #353535;
		height: 56upx;
		line-height: 28upx;
		font-size: 11pt;
		margin-bottom: 18upx;
	}

	.target-step text {
		font-size: 17pt;
		color: #ff4544;
		font-family: 'DIN';
	}

	.dare-gold {
		margin-top: -5upx;
		margin-bottom: 8upx;
		font-size: 10pt;
	}

	.dare-gold text {
		color: #ff9d1e;
	}

	.join {
		height: 56upx;
		width: 200upx;
		border-radius: 28upx;
		background-color: #ff9d1e;
		color: #ffffff;
		font-size: 10pt;
		line-height: 56upx;
		margin: 18upx 0 20upx;
	}

	.exchange-title {
		font-size: 11pt;
		color: #353535;
		margin: 20upx auto 10upx;
		text-align: center;
		height: 96upx;
		background-color: white;
		position: relative;
	}

	.exchange-title image {
		width: 320upx;
		height: 96upx;
	}

	.exchange-title text {
		display: inline-block;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		width: auto;
		height: 96upx;
		line-height: 96upx;
		margin: 0 auto;
	}

	.title-right {
		transform: rotate(180deg);
	}

	.exchange-title text {
		margin: 0 16upx;
	}

	.good-list {
		margin: 0 -5upx;
		padding-bottom: 105upx;
	}

	.good {
		display: inline-block;
		background-color: #f7f7f7;
		height: 570upx;
		width: 50%;
		padding: 0 5upx;
		margin-bottom: 10upx;
	}

	.good image {
		width: 100%;
		height: 370upx;
	}

	.good-info {
		height: 200upx;
		margin-top: -10upx;
		padding: 15upx 24upx 24upx 24upx;
		background-color: white;
	}

	.good-name {
		color: #353535;
		font-size: 11pt;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.good-price {
		font-size: 11pt;
		color: #ff9d1e;
		margin: 8upx 0;
	}

	.good-exchange {
		width: 322upx;
		height: 64upx;
		border-radius: 28upx;
		background-color: #ff9d1e;
		color: white;
		font-size: 11pt;
		line-height: 64upx;
		text-align: center;
	}

	.button:active {
		border-radius: 140upx;
		background-color: rgba(0, 0, 0, .5);
	}

	.loading {
		font-size: 11pt;
		color: #353535;
		text-align: center;
		height: 80upx;
		line-height: 80upx;
		background-color: white;
	}

	.more {
		height: 72upx;
		width: 120upx;
		padding: 0 23upx 0 32upx;
		margin: 4upx 0;
		border-radius: 36upx;
		vertical-align: top;
		background-color: #f2f2f2;

	}

	.more text {
		display: inline-block;
		height: 60upx;
		margin-top: 8upx;
		color: #666666;
		font-size: 8pt;
		margin-right: 8upx;
	}

	.more image {
		height: 20upx;
		margin-top: 26upx;
		width: 10upx;
		float: right;
	}

	.over-screen {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 100%;
		width: 100%;
		background-color: rgba(0, 0, 0, .3);
		z-index: 100;
	}

	.window {
		height: 160upx;
		line-height: 160upx;
		width: 84%;
		position: fixed;
		top: 400upx;
		left: 0;
		right: 0;
		margin: 0 auto;
		background-color: white;
		text-align: center;
		font-size: 12pt;
		color: #353535;
		border-top-left-radius: 16upx;
		border-top-right-radius: 16upx;
	}

	.get-setting {
		height: 88upx;
		line-height: 88upx;
		width: 84%;
		position: fixed;
		top: 560upx;
		left: 0;
		right: 0;
		margin: 0 auto;
		border-top: 1upx solid #e2e2e2;
		background-color: white;
		text-align: center;
		border-bottom-left-radius: 16upx;
		border-bottom-right-radius: 16upx;
		font-size: 12pt;
		color: #353535;
	}
</style>
